/* url:执行操作的页面地址，该页面必须返回html
 * sbody：参数字符串,格式"参数1=值1&参数2=值2"
 */

var sxhr=false;
function getresult(url,sbody)
{
	if(window.XMLHttpRequest)
	{
		sxhr=new XMLHttpRequest();
	}
	else
	{
		if(window.ActiveXObject)
		{
			try
			{
				sxhr=new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch(e)
			{
			}
		}
	}
	if(sxhr)
	{
		sxhr.onreadystatechange=showContents;
		sxhr.open("post",url,true);
		sxhr.setRequestHeader("CONTENT-TYPE","application/x-www-form-urlencoded");
		sxhr.send(sbody);
	}
	else
	{
		alert("发生错误");
	}
}
function showContents()
{
    var outMsg="发生错误";
	if(sxhr.readyState==4)
	{
		if(sxhr.status==200)
		{
			outMsg=sxhr.responseText;
                        var i=0;
                for(i=0;i<btns.length;i++)
                    {
                        document.getElementById(btns[i]).disabled=false;
                    }
                        
		}
		else
		{
			outMsg="发生错误";
		}
	}
    return outMsg;
}


